<html>
     <head>
          <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
          <script type="text/javascript" src="js/jquery.js"></script>
          <script type="text/javascript" src="js/main.js"></script>
          <style>
               *{
                    padding: 0;
                    margin: 0;
               }
               li{
                    list-style:none;
               }
               #aform{
                    margin: 0 auto;
               }
               #aform .a1{
                    width: 350px;
                    color:#0044CF;
                    background:#BEB3A5;
               }
               #guestbook{
                    width: 400px;
                    margin: 0 auto;
                    margin-bottom: 20px;
                    margin-top: 20px;
                    background:#EBE2E0;
               }
               #guestbook ul li{
                    margin-top: 5px;
                    border: 1px solid #999;          
                    background: url(img/bg.jpg);
               }
               #guestbook ul li span.a1{
                    color:#1F7800;
                    font-size: 14px;
                    font-weight: 500;
               }
               #guestbook ul li h3{
                    font-size: 11px;
               }
               #guestbook ul li h3 a{
                    color: #818181;
                    text-decoration: none;
                    float: right;
                    font-size: 10px;
                    margin-right: 10px;
                    margin-top: 5px;
               }
               #guestbook ul li h3 a:hover{
                    color: #000;
               }
               #guestbook ul li p{
                    font-size: 11px;
                    border-top: 1px dashed #6F6F6F;
               }
          </style>
     </head>
     <body>
          <?php
          $data = array();
          if (is_file("msg.db.php")) {
               $data = include 'msg.db.php';
          }
          ?>
          <div id="guestbook">
               <ul>
                    <?php
                    if (is_array($data) && !empty($data)) {
                         foreach ($data as $id => $d):
                              ?>
                              <li>
                                   <h3><span class="a1">标题：</span><?php echo $d["title"]; ?>
                                        <a lab="del" gid="<?php echo $id; ?>" href="javascript:void(0)">删除</a>
                                   </h3>
                                   <p><span class="a1">内容：</span><?php echo $d["content"]; ?></p>
                              </li>
                              <?php
                         endforeach;
                    }
                    ?>               
               </ul>
          </div>
          <form action="control.php" method="post">
               <table width="400" border="1" id="aform">
                    <tr>
                         <td width="50">标题</td>
                         <td><input type="text" name="title" class="a1" /></td>
                    </tr>
                    <tr>
                         <td width="50">内容</td>
                         <td><textarea name="content" class="a1" ></textarea></td>
                    </tr>
                    <tr>  
                         <td cols="2"><input type="submit" value="提交"/></td>
                    </tr>
               </table>
          </form>
     </body>
</html>